<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var arr = [
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",
        "A",
        "B",
        "C",
        "D",
        "E",
        "F",
      ];
      var str = "#";
      function getRandom(min, max) {
        return Math.floor(Math.random() * (max - min + 1) + min);
      }
      for (var i = 0; i < 6; i++) {
        var num = 0;
        num = getRandom(0, arr.length - 1);
        str += arr[num];
      }
      console.log(str);
    </script>
  </body>
</html>
